package net.wangds.auth.resource.repo.rdbms;

import net.wangds.auth.module.ResourceSchemaEnum;
import net.wangds.auth.resource.entity.GeneralResourceEntity;
import net.wangds.data.RemovedEnum;
import net.wangds.jpa.repository.RemovableRepo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.util.List;

public interface ResourceJpaRepo extends RemovableRepo<GeneralResourceEntity> {


    List<GeneralResourceEntity> findBySchemaAndSys(ResourceSchemaEnum schema, String sys, Sort sort);

    List<GeneralResourceEntity> findBySchema(ResourceSchemaEnum schema, Sort sort);

    Page<GeneralResourceEntity> findBySchema(ResourceSchemaEnum schema, Pageable sort);

    List<GeneralResourceEntity> findBySchemaAndSysAndRemoved(ResourceSchemaEnum menu, String system, RemovedEnum normal, Sort sort);
}
